<?php

namespace App\Services\Warehouse\Model;

use App\Models\Administrator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;

class PartsInventory  extends Model
{
    //新建档案
    public const STATE_SET_UP = 0;
    //新品入库
    public const STATE_NEW_PRODUCT = 1;
    //仓库中
    public const STATE_CANGKU = 2;
    //使用中
    public const STATE_EMPLOY = 3;
    //需要修模
    public const STATE_NEED_REPAIR = 4;
    //维修中
    public const STATE_MAINTAIN = 5;
    //已报废
    public const STATE_SCRAP = 6;
    
    public const STATES = array(
        self::STATE_SET_UP => '新建档案',
        self::STATE_NEW_PRODUCT => '新品入库',
        self::STATE_CANGKU => '仓库中',
        self::STATE_EMPLOY => '使用中',
        self::STATE_NEED_REPAIR => '需要修模',
        self::STATE_MAINTAIN => '维修中',
        self::STATE_SCRAP => '已报废'
    );

    protected $table = 'k_parts_inventory';

    protected $fillable = [
        'parts_id', 'fs_id','state','po_id','user_id'
    ];

    protected $primaryKey = 'parts_id';
}
